
<?php

/**
 * @file
 *   
 * Register.
*/

/* EM Registration */
function registration_em_page() {
    drupal_set_title("Emancipated Minor");
    
    // Register all required libraries.
    drupal_add_library('system', 'jquery', TRUE);
    drupal_add_library('system', 'jquery.once', TRUE);

    return drupal_get_form('registration_em_form');
}
function registration_em_form($form, &$form_state) {
    return mforms_build('em', '_register_em_pre_registration', $form_state);
}

function registration_em_form_validate($form, &$form_state) {
    mforms_validate('em', $form, $form_state);
}

function registration_em_form_submit($form, &$form_state) {
  mforms_submit('em', $form, $form_state);
}


/* Parent Registration */
function registration_parent_page() {
    drupal_set_title("Parent");
    
    // Register all required libraries.
    drupal_add_library('system', 'jquery', TRUE);
    drupal_add_library('system', 'jquery.once', TRUE);

    return drupal_get_form('registration_parent_form');
}
function registration_parent_form($form, &$form_state) {
    return mforms_build('parent', '_registration_parent_pre_registration', $form_state);
}


function registration_parent_form_validate($form, &$form_state) {
    mforms_validate('parent', $form, $form_state);
}

function registration_parent_form_submit($form, &$form_state) {
  mforms_submit('parent', $form, $form_state);
}

/* YP Registration */
function registration_yp_page() {
    drupal_set_title("Parent");
    
    // Register all required libraries.
    drupal_add_library('system', 'jquery', TRUE);
    drupal_add_library('system', 'jquery.once', TRUE);

    return drupal_get_form('registration_yp_form');
}
function registration_yp_form($form, &$form_state) {
    return mforms_build('parent', '_register_yp_demographic_info', $form_state);
}


function registration_yp_form_validate($form, &$form_state) {
    mforms_validate('parent', $form, $form_state);
}

function registration_yp_form_submit($form, &$form_state) {
  mforms_submit('parent', $form, $form_state);
}



